﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Core.Business;

namespace TicketManagement.Template
{
    public partial class uStaffSidebar : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            this.displaySidebar();
        }

        private void displaySidebar()
        {
            if (Session["User"] != null)
            {
                UserBus userBus = new UserBus();
                Core.Entity.User user = userBus.get((int)Session["User"]);
                if (user.UserTypeId != 1)
                {
                    adminMenu.Visible = false;
                }
            }
        }
    }
}